body {
    /* background: #f2f2f2; */
    background: #282c34;
}

.frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    margin-top: -200px;
    margin-left: -200px;
    border-radius: 2px;
    box-shadow: 1px 2px 10px 0px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    background: #16a078;
    color: #fff;
}

.flower {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 175px;
    left: 175px;
    transition: all 0.5s ease-in-out;
    animation: flower 7s ease infinite;

    &:hover {
        .dot,
        .leaf {
            opacity: 0.3;
        }
    }

    .dot {
        position: absolute;
        z-index: 5;
        width: 50px;
        height: 50px;
        left: 0;
        top: 0;
        background: #f1c40f;
        border-radius: 50%;
        opacity: 0.8;
        transition: opacity 0.5s ease-in-out;
        transform: scale(0);

        animation: dot 7s ease-in-out infinite;
    }

    .leaf {
        position: absolute;
        z-index: 1;
        width: 50px;
        height: 50px;
        background: #fff;
        border-radius: 2px 50px;
        opacity: 0.8;
        transition: all 0.5s ease-in-out;
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);

        --angle: calc(360deg / 16);
        --deg: calc(var(--angle) * var(--i));

        transform: rotate(var(--deg)) translateY(0);
        animation: leaf 7s ease infinite;

        &:nth-child(2n + 2) {
            z-index: 2;
        }
    }
}

@keyframes leaf {
    0%,
    100% {
        transform: rotate(var(--deg)) translateY(0);
    }
    60% {
        transform: rotate(var(--deg)) translate(-35px, -35px) scale(2);
        box-shadow: -5px -5px 1px 0 rgba(0, 0, 0, 0.06);
    }
}

@keyframes dot {
    12% {
        transform: scale(0);
    }
    25% {
        transform: scale(1.1);
    }
    30% {
        transform: scale(0.95);
    }
    31%,
    55% {
        transform: scale(1);
    }
    58% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(0);
    }
}

@keyframes flower {
    0% {
        transform: rotate(0);
    }
    60% {
        transform: rotate(180deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
